
// This is the command sequence that initialises the ST7789 driver

// Configure ST7789 display

{
static const uint8_t PROGMEM
  st7789[] = {
    20,
    TFT_SLPOUT, TFT_INIT_DELAY, 255,
    TFT_COLMOD, 1+TFT_INIT_DELAY, 0x55, 10,
    TFT_MADCTL, 1, 0x00,
    TFT_CASET, 4, 0x00, 0x00, 0x00, 0xF0,
    TFT_PASET, 4, 0x00, 0x00, 0x00, 0xF0,

    ST7789_PORCTRL,5,0x1f,0x1F,0x00,0x33,0x33,
    ST7789_GCTRL,1,0x00,
    ST7789_VCOMS,1,0x36,
    ST7789_VDVVRHEN,1,0x01,
    ST7789_VRHS,1,0x13,
    ST7789_VDVSET,1,0x20,
    ST7789_FRCTR2,1,0x13,
    ST7789_D6H,1,0xA1,
	ST7789_PWCTRL1,2,0xA4,0xA1,
	ST7789_PVGAMCTRL,14,0xf0,0x08,0x0e,0x09,0x08,0x04,0x2f,0x33,0x45,0x36,0x13,0x12,0x2a,0x2d,
    ST7789_NVGAMCTRL,14,0xf0,0x0e,0x12,0x0c,0x0a,0x15,0x2e,0x32,0x44,0x39,0x17,0x18,0x2b,0x2f,
    ST7789_GATECTRL,3,0x1d,0x00,0x00,
	
    TFT_INVON, TFT_INIT_DELAY, 10,
    TFT_NORON, TFT_INIT_DELAY, 10,
    TFT_DISPON, TFT_INIT_DELAY, 255
    };

    commandList(st7789);
}
// End of ST7789 display configuration